package com.block.datapush.service.apipush.utils;

import cn.hutool.core.util.StrUtil;
import com.block.common.enums.BaseTypeInfoEnum;

/**
 * 银源
 */
public class YinYuanApiUtil {

    public static String getJob(String job) {
        if (StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz001.getValue(), job)) {
            return "工薪族";
        }else if (StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz002.getValue(), job)){
            return "企业主";
        }else if (StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz003.getValue(), job)){
            return "自由职业";
        }else if (StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz004.getValue(), job)){
            return "公务员";
        }
        return "无";
    }

    public static String getShouru(String shouru) {
        if (StrUtil.equals(BaseTypeInfoEnum.Shouru.sr001.getValue(), shouru)) {
            return "5000";
        }else if (StrUtil.equals(BaseTypeInfoEnum.Shouru.sr002.getValue(), shouru)){
            return "10000";
        }else if (StrUtil.equals(BaseTypeInfoEnum.Shouru.sr003.getValue(), shouru)){
            return "20000";
        }
        return "25000";
    }

    public static Integer getloan(String loan) {
        if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la001.getValue(), loan)) {
            return 3;
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la002.getValue(), loan)) {
            return 5;
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la003.getValue(), loan)) {
            return 10;
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la004.getValue(), loan)) {
            return 20;
        }
        return 25;
    }

    public static Integer getLoanTime(String loanTime) {
        if (StrUtil.equals(BaseTypeInfoEnum.LoanTime.lt001.getValue(), loanTime)) {
            return 3;
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanTime.lt002.getValue(), loanTime)) {
            return 6;
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanTime.lt003.getValue(), loanTime)) {
            return 12;
        }
        return 24;
    }

    public static String getXinyongka(String xinyongka) {
        if (StrUtil.equals(BaseTypeInfoEnum.XinYongKa.xyk001.getValue(), xinyongka)) {
            return "N";
        }
        return "Y";
    }

    public static String getHouse(String house) {
        if (StrUtil.equals(BaseTypeInfoEnum.House.hu001.getValue(), house)) {
            return "N";
        }else if (StrUtil.equals(BaseTypeInfoEnum.House.hu003.getValue(), house)){
            return "B";
        }else if (StrUtil.equals(BaseTypeInfoEnum.House.hu004.getValue(), house)){
            return "W";
        }
        return "Y";
    }

    public static String getCar(String car) {
        if (StrUtil.equals(BaseTypeInfoEnum.Car.car001.getValue(), car)) {
            return "N";
        }
        return "Y";
    }

    public static String getshebao(String shebao) {
        if (StrUtil.equals(BaseTypeInfoEnum.Shebao.sb001.getValue(), shebao)) {
            return "N";
        }
        return "Y";
    }

    public static String getGjj(String gongjijin) {
        if (StrUtil.equals(BaseTypeInfoEnum.Gjj.gjj001.getValue(), gongjijin)) {
            return "N";
        }
        return "Y";
    }

    public static String getbaodan(String baodan) {
        if (StrUtil.equals(BaseTypeInfoEnum.Baoxian.bx001.getValue(), baodan)) {
            return "N";
        }
        return "Y";
    }

    public static Integer getXueLi(String xueli) {
        if (StrUtil.equals(BaseTypeInfoEnum.XueLi.xl002.getValue(), xueli)) {
            return 1;
        }else if (StrUtil.equals(BaseTypeInfoEnum.XueLi.xl003.getValue(), xueli)){
            return 2;
        }else if (StrUtil.equals(BaseTypeInfoEnum.XueLi.xl004.getValue(), xueli)){
            return 3;
        }else if (StrUtil.equals(BaseTypeInfoEnum.XueLi.xl005.getValue(), xueli)){
            return 4;
        }
        return 0;
    }











}
